package com.uuah.server.context.notification;

/**
 *
 * TODO comment ...
 *
 * <p>
 * update record:updator，update time，update content and version
 * </p>
 *
 * @author <a href="jonny_quan@hotmail.com">jonny</a>
 * @date 2009 2009-3-27 下午01:33:23
 * @version 1.0.0
 */
class EventSender {
	private ListenerSubscriptionPair pair;

	EventSender(ListenerSubscriptionPair pair) {
		this.pair = pair;
	}

	public void dispatch(ServerNotification notification) {
		if (pair.isNullSubscription()
				|| (null != notification.getResourceIdentifier())) {
			pair.getListener().onNotification(notification);
		}
	}

}
